/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.uniscol.dao.mapper;

import fr.uniscol.model.Matiere;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;

/**
 *
 * @author Christophe
 */
public class MatiereRowMapper implements RowMapper<Matiere>{

    @Override
    public Matiere mapRow(ResultSet rs, int rowNum) throws SQLException {
        
        Matiere mat = new Matiere();
        mat.setId(rs.getLong("MATIEREID"));
        mat.setLibelle(rs.getString("LIBELLE"));
        mat.setLibelleLong(rs.getString("LIBELLE_LONG"));
        mat.setCodeSiecle(rs.getString("ID_SIECLE"));
        
        return mat;
    }
}
